package com.gxdf.extendedcontrols.gxdfclient;

import java.util.List;

import com.artech.R;
import com.gxdf.extendedcontrols.gxdfclient.components.GxdfStoredValues;



import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.widget.LinearLayout;
import android.widget.TextView;

public class PreviewActivity extends Activity {

	@SuppressWarnings("unchecked")
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_preview);
		
	//	LinearLayout ly = (LinearLayout) findViewById(R.id.main_result);
		
	//	ViewGroup mainLay = (ViewGroup) findViewById(R.id.main_result);		
	//	LayoutInflater inflater = LayoutInflater.from(this);
		
		
		List<GxdfStoredValues> svalues;				
		Intent i = getIntent();	
		svalues = (List<GxdfStoredValues>)i.getSerializableExtra("fields");
		
		for(GxdfStoredValues sv:svalues){
			
					
			//TextView lbl = (TextView) ly.findViewById(R.id.textView1);
			TextView lbl = new TextView(this);
			lbl.setText(sv.getFormName() + " " + sv.getIndex() + " " + sv.getFieldName() + ": " + sv.getValue());
	//		ly.addView(lbl);
			
			
		}
		
		//mainLay.addView(ly);
		
	}


	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		//getMenuInflater().inflate(R.menu.preview, menu);
		return true;
	}

}
